#ifndef _CTIMER_H
#define _CTIMER_H

#include "Global Variables.h"

class CTimer
{
public:
	//---------------------------//
	// Destructor for this class //
	//---------------------------//
	~CTimer();

	//--------------------------------//
	//	Public methods for this class //
	//--------------------------------//
	float		Tick			();
	void		Start			();
	void		FreshTime		();
	float		GetFrameRate	();

	//--------------------------------//
	//	Static methods for this class //
	//--------------------------------//
	static CTimer*	GetInstance	();

	
private:
	//-----------------------------------//
	// Constructor for this class        //
	// Note : we're using singleton here //
	//-----------------------------------//
	CTimer();


	//----------------------------------//
	//	Static variables for this class //
	//----------------------------------//
	static CTimer*	m_pTimer;


	//-----------------------------------//
	//	Private variables for this class //
	//-----------------------------------//
	float			m_Count;
	DWORD			m_LastFPSTime;
	float			m_FPSAvarage;

	LARGE_INTEGER	m_NS_LastTime;
	LARGE_INTEGER	m_NS_CurrentTime;
	LARGE_INTEGER	m_NS_Frequency;

	bool			m_IsPerfHardware;

	DWORD			m_MS_LastTime;
	DWORD			m_MS_CurrentTime;
};

#endif